﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="Home" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script>
    function nextPage(id, list) {
        $('#imgNext').show();
        $('#imgPrev').show();
        $('#item').val(id);
        $('#ctl00_ContentPlaceHolder1_currentList').val(list);
    }

    function showNextPage(s) {
        var arr = s.split(",");
        var currentItem = $('#item').val();
        for (var i = 0; i < arr.length; i++) {
            if (arr[i] == currentItem) {
                $('#' + arr[i + 1].toString()).trigger('click');
            }
        }
    }
    function showPrePage(s) {
        var arr = s.split(",");
        var currentItem = $('#item').val();
        for (var i = 0; i < arr.length; i++) {
            if (arr[i] == currentItem) {
                $('#' + arr[i - 1].toString()).trigger('click');
            }
        }
    }

    function getUrlVars() {
        var vars = [], hash;
        var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
        for (var i = 0; i < hashes.length; i++) {
            hash = hashes[i].split('=');
            vars.push(hash[0]);
            vars[hash[0]] = hash[1];
        }
        return vars;
    }

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div class="content_new">
        <div class="columns-about">   
               <div class="headingfull">
                <div class="title">About Tuan Huy</div>
               </div>
            <div class="box">
                <div class="des">
                    Gioi thieu
                </div>
            </div>
       <div class="heading" style="margin-top:20px;">
            <div class="title">San Pham</div>
        </div>
         <div class="line"></div>
         <div style="background:#fff; padding:20px;box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.5);">
        <div id="slider1" class="bxslider">
            <asp:Repeater runat="server" ID="rpProduct">
                <ItemTemplate>
                    <div class="slide boximage" >
                        <a id='<%#Eval("ID")%>' href='<%# "ProductDetails.aspx?id=" + Eval("ID")%>' class="ajax-popup-link" onclick="javascript:nextPage(this.id,$('#ctl00_ContentPlaceHolder1_hdListTour').val());" >
                            <asp:Image ID="Image1" runat="server" ImageUrl='<%#Eval("IMAGE")%>' title='<%#Eval("ProductName")%>' CssClass="imagetour" />
                        </a>
                    </div>
                </ItemTemplate>
            </asp:Repeater>
        </div>
        </div>

               <div class="heading" style="margin-top:20px;">
            <div class="title">Du An</div>
        </div>
         <div class="line"></div>
         <div style="background:#fff; padding:20px;box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.5);">
        <div id="slider2" class="bxslider">
            <asp:Repeater runat="server" ID="rpProjects">
                <ItemTemplate>
                    <div class="slide boximage" >
                        <a id='<%#Eval("ID")%>' href='<%# "ProjectDetails.aspx?id=" + Eval("ID")%>' class="ajax-popup-link" onclick="javascript:nextPage(this.id,$('#ctl00_ContentPlaceHolder1_hdListTour').val());" >
                            <asp:Image ID="Image1" runat="server" ImageUrl='<%#Eval("IMAGE")%>' title='<%#Eval("Name")%>' CssClass="imagetour" />
                        </a>
                    </div>
                </ItemTemplate>
            </asp:Repeater>
        </div>
        </div>

         </div>
         <div class="columns-right">   
               <div class="headingfull">
                <div class="title">Quang cao</div>
               </div>
            <div class="box">

            </div>
         </div>
         </div>
<script type="text/javascript">
    $(document).ready(function () {
        $('#slider1').bxSlider({
            minSlides: 1,
            maxSlides: 4,
            slideWidth: 225,
            slideMargin: 20,
            pager: false,
            captions: true
        });
        $('#slider2').bxSlider({
            minSlides: 1,
            maxSlides: 4,
            slideWidth: 225,
            slideMargin: 20,
            pager: false,
            captions: true
        });
        $('.ajax-popup-link').magnificPopup({
            type: 'ajax',
            closeOnBgClick: false
        });
        if (getUrlVars()["shareid"] != null) {
            $('#' + getUrlVars()["shareid"]).trigger('click');
        }
    });
        </script>
</asp:Content>

